<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head>
    <title>SimpleXML Tests</title>
</head>
<script language="javascript" src="simplexml.js" type="text/javascript"></script>
<script language="javascript" type="text/javascript">


window.onload = function() {
   var movies = simplexml_load_string("<movies><movie><name age='11' vistage='2121'>The Flop Movie</name></movie></movies>");
   writeln(movies.movie[0].name[0].getAttributes().length);
   writeln(movies.movie[0].name[0]);
  /* for(var x in movies) {
   	writeln(x);
   }
writeln(movies)*/
}

function writeln(str) {
	var output = document.getElementById("output");
	output.innerHTML += str + "<br />";
}

</script>
<body>
<div id="output"></div>
</body>
</html>
